#!/usr/bin/env bash
# 实例文件：check_arg_count
#
# 检查正确的参数数量
# 使用下列语法或或： if [ $# -lt 3 ]
if(( $# < 3 )) 
then
    printf "%b" "Error. Not enough arguments.\n" >&2
    printf "%b" "usage: check_arg_count file1 op file2\n" >&2
    exit 1
elif(( $# > 3 ))
then
    printf "%b" "Error. Too many arguments.\n" >&2
    printf "%b" "usage: check_arg_count file1 op file2\n" >&2
    exit 2
else
    printf "%b" "Argument count correct. Proceeding...\n"
fi
